import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

const store = new Vuex.Store({
	state: {
		/**
		 * 是否需要强制登录
		 */
		forcedLogin: false,
		hasLogin: false,
		userName: "",
		userId: "",
		thing: "",
		mess: {},
		//password: ""
	},
	mutations: {
		setUserName(state,name){
			state.userName = name
		},
		setUserId(state, userid){
			state.userId = userid
		},
		setThing(state, thing) {
			state.thing = thing
		},
		setMess(state, mess){
			state.mess = mess
		}
	}
})

export default store
